package cn.liuhuan1.blogsModel.controller;

import cn.liuhuan1.entity.ReturnResult;
import cn.liuhuan1.webModelBean.api.MailImp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Auther: liuhuan
 * @Date: 2021/4/22 - 04 - 22 - 18:27
 * @Description:
 * @version: 1.0
 */
@Controller
@RequestMapping("/mail")
public class MailController {


    @Autowired
    private MailImp mailImp;
    @RequestMapping(value = "/sendMail",method = RequestMethod.GET)
    @ResponseBody
    public ReturnResult sendMail(@RequestParam("mail") String mail){
        mailImp.sendMail(mail);
        return ReturnResult.succes();
    }
}
